#!/bin/bash
set -ex
#set -e
# -------------------------------------------------------------------------------
# Filename:     deploy_env_s.sh
# UpdateDate:   2025/08/26
# Description:  一键搭建验证环境。
# Example:      cd /home/share/pytorch2.5/vllm/qwen3/tools/ && bash deploy_env_s.sh
# Depends:
# Notes:        本脚本适用于初次进入docker容器环境；不适用于再次进入容器，可能会有意想不到问题
# -------------------------------------------------------------------------------

#切换到推理环境
#source /torch/venv3/pytorch_infer/bin/activate
#卸载旧版本vllm
pip uninstall -y vllm && pip uninstall -y vllm-mlu
cd /workspace && rm -rf vllm-v0.6.2
#下载vllm
git clone http://gitlab.software.cambricon.com/neuware/oss/vllm-project/vllm.git
cd vllm && git checkout -b zpd-mlu370-1299 && git checkout 63b38721c78f70c7f756564e2b6b2233fb8430f2
#安装新版vllm
pip install -e . && cd vllm_mlu && pip install -e .
#安装指定版本 transformers
pip install transformers==4.51.0
#安装 modelscope、gradio
pip install modelscope gradio jupyter
